# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Johnathan Jenkins <twodopeshaggy@gmail.com>
# Contributor: prettyvanilla <prettyvanilla@posteo.at>
# Contributor: almostalive <almostalive2003@gmail.com>

pkgname=libretro-desmume
pkgver=6357
pkgrel=1
pkgdesc='Nintendo DS core'
arch=(loong64 x86_64)
url=https://github.com/libretro/desmume
license=(GPL2)
groups=(libretro)
depends=(
  libgl
  libretro-core-info
)
makedepends=(
  git
  libpcap
  mesa
)
_commit=4ee1bb1d6a6c9695baea49d0c2dff34c10187502
source=(libretro-desmume::git+https://github.com/libretro/desmume.git#commit=${_commit})
sha256sums=(SKIP)

pkgver() {
  cd libretro-desmume

  git rev-list --count HEAD
}

build() {
  make -C libretro-desmume/desmume/src/frontend/libretro -f Makefile.libretro
}

package() {
  install -Dm 644 libretro-desmume/desmume/src/frontend/libretro/desmume_libretro.so -t "${pkgdir}"/usr/lib/libretro/
}

# vim: ts=2 sw=2 et:
